package com.jk.tweetsnear;

import java.util.ArrayList;

import android.os.Bundle;
import android.support.v4.app.FragmentActivity;
import android.widget.LinearLayout;

import com.google.ads.AdRequest;
import com.google.ads.AdSize;
import com.google.ads.AdView;
import com.jk.tweetsnear.application.App;
import com.jk.tweetsnear.data.TweetData;
import com.jk.tweetsnear.utils.Utils;

public class MainActivity extends FragmentActivity 
{
	public final String TAG = getClass().getSimpleName() + Utils.TAG_OPTION;
	private static final String MY_AD_UNIT_ID = "a151f9f7cdc2fa7";

	private AdView adView;

	public static ArrayList<TweetData> arrayTweetData = new ArrayList<TweetData>();
	public static int TWEET_COUNT = 20;

	private LinearLayout llAdmob;

	@Override
	protected void onCreate(Bundle savedInstanceState)
	{
		super.onCreate(savedInstanceState);
		setContentView(R.layout.main_activity);

		App.act = this;
		
		setWidjet();
		
		adView = new AdView(this, AdSize.BANNER, MY_AD_UNIT_ID);
		llAdmob.addView(adView);
		adView.loadAd(new AdRequest());

	}

	private void setWidjet()
	{
		llAdmob = (LinearLayout) findViewById(R.id.ll_admob);
	}

	@Override
	protected void onResume()
	{
		super.onResume();
	}
	
	/*
	@Override
	protected void onDestroy()
	{
		if(adView != null)
			adView.destroy();
		super.onDestroy();
	}
	*/
}
